<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="javax.jdo.Query" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="java.util.List" %>
<%@ page import="shared.PMF" %>
<%@ page import="activity.*" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-Selection SEARCH-</title>
</head>

<body>
<p>&nbsp;</p>
<form id="form1" name="form1" method="post" action="searchNewForm.jsp">
  <p>請選擇便利商店名:   
    <label>
      <select name="selectShop">
<%
		PersistenceManager pm = PMF.get().getPersistenceManager();
		Query query = pm.newQuery(activity.Activity.class);
		List<Activity> results = (List<Activity>) query.execute();
        for (Activity act : results) {      	
%>
	  <option value=<%=act.getActShop() %>><%=act.getActShop() %></option>				
<% 
        }	
       %>
  		</select>
    </label>
    <label>
      <input type="submit" name="button" id="button" value="Submit" />
</label>
<br />
  </p>
</form>
<p>現有活動：(大活動新增目前是由管理員執行，活動名稱統一使用大活動已存在名稱，顯示7-ELEVEN現有活動)
(以字串判斷true/false 活動名稱資料!!)</p>
<form id="form2" name="form2" method="post" action="">
  <label> </label>
請選擇日期:
<label>
  <select name="selectYear_sear" id="select2">
  		<option value="2012">2012</option>
        <option value="2013">2013</option>
        <option value="2014">2014</option>
  </select>
</label>
/
<label>
  <select name="selectMonth_sear" id="select3">
  	    <option value="01">01</option>
    	<option value="02">02</option>
    	<option value="03">03</option>
    	<option value="04">04</option>
    	<option value="05">05</option>
    	<option value="06">06</option>
    	<option value="07">07</option>
	    <option value="08">08</option>
    	<option value="09">09</option>
    	<option value="10">10</option>
    	<option value="11">11</option>
    	<option value="12">12</option>
  </select>
</label>
/
<label>
  <select name="selectDay_sear" id="select4">
   		<option value="01">01</option>
    	<option value="02">02</option>
    	<option value="03">03</option>
    	<option value="04">04</option>
    	<option value="05">05</option>
    	<option value="06">06</option>
    	<option value="07">07</option>
	    <option value="08">08</option>
    	<option value="09">09</option>
    	<option value="10">10</option>
    	<option value="11">11</option>
    	<option value="12">12</option>
        <option value="13">13</option>
    	<option value="14">14</option>
    	<option value="15">15</option>
    	<option value="16">16</option>
    	<option value="17">17</option>
	    <option value="18">18</option>
    	<option value="19">19</option>
    	<option value="20">20</option>
    	<option value="21">21</option>
    	<option value="22">22</option>
        <option value="23">23</option>
    	<option value="24">24</option>
    	<option value="25">25</option>
    	<option value="26">26</option>
    	<option value="27">27</option>
	    <option value="28">28</option>
    	<option value="29">29</option>
    	<option value="30">30</option>
    	<option value="31">31</option>
  		
  </select>
</label>
<label>
  <input type="submit" name="button2" id="button2" value="Submit" />
</label>
</form>
<p>您可參加活動：</p>
<p>(在此日期條件下，搜尋該活動以字串比對相對應結果，列出所有活動資料<br />
  改變addShop選單，creatPoint_s選單要抓取大活動選單的活動名稱<br />
  搜尋抓取creatPoint_s選單店家活動再做查詢日期。)<br />
</p>
</body>
</html>